package com.ym.medical.domain.param;

import com.ym.common.annotations.CustomConstraint;
import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.MindEntity;
import com.ym.medical.enums.PaymentWayEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author wenbo
 * @Date 2019/12/17 11:28
 **/
@Data
public class MindParam extends BeanCovert<MindEntity> {

    private Long id;

    @ApiModelProperty(notes = "关联id")
    private Long relatedId;

    @ApiModelProperty(notes = "答谢订单编号")
    @Size(max = 20 , message = "答谢订单编号长度必须在{min}和{max}之间")
    private String ioNum;

    @ApiModelProperty(notes = "答谢人主键")
    private Long userId;

    @ApiModelProperty(notes = "被答谢人主键")
    private Long doctorId;

    @ApiModelProperty(notes = "答谢金额主键")
    private Long thankMoneyId;

    @ApiModelProperty(notes = "答谢备注")
    @Size(max = 2000 , message = "答谢备注长度必须在{min}和{max}之间")
    private String thankContent;

    @ApiModelProperty(notes = "创建时间")
    private Date createTime;

    @ApiModelProperty(notes = "答谢来源")
    @Size(max = 2 , message = "答谢来源长度必须在{min}和{max}之间")
    private String thankSource;

    @ApiModelProperty(notes = "支付状态 (01 待支付 02 已支付 03 退费申请中 04 已退费 05支付失败)PaymentStateEnum")
    @Size(max = 2 , message = "支付状态 (01 待支付 02 已支付 03 退费申请中 04 已退费 05支付失败)PaymentStateEnum长度必须在{min}和{max}之间")
    private String payState;

    @ApiModelProperty(notes = "可空，付款账户")
    @Size(max = 32 , message = "可空，付款账户长度必须在{min}和{max}之间")
    private String payAcc;

    @ApiModelProperty(notes = "付款方式")
    @Size(max = 2 , message = "付款方式长度必须在{min}和{max}之间")
    private String payType;

    @ApiModelProperty(notes = "支付来源 (01-小程序 02-公众号)")
    @Size(max = 2 , message = "支付来源 (01-小程序 02-公众号)长度必须在{min}和{max}之间")
    private String paySource;

    @ApiModelProperty(notes = "交易时间")
    private Date tdTime;

    @ApiModelProperty(notes = "答谢来源")
    private String thankSourceName;

    @ApiModelProperty(notes = "支付状态 (01 待支付 02 已支付 03 退费申请中 04 已退费 05支付失败)PaymentStateEnum")
    private String payStateName;

    @ApiModelProperty(notes = "付款方式")
    private String payTypeName;

    @ApiModelProperty("用户头像")
    private String headUrl;

    @ApiModelProperty("用户姓名")
    private String userRealName;

    @ApiModelProperty("答谢金额")
    private BigDecimal thankMoney;

    @ApiModelProperty("支付方式")
    @CustomConstraint(PaymentWayEnum.class)
    private String paymentWay;

    @ApiModelProperty("支付方式 key='PaymentWayEnum'")
    private String paymentWayName;
}
